#!  python
# -*- coding: UTF-8 -*-
'''
@Author ：Star
@Date ：2022/9/20  
'''
from selenium import webdriver
from selenium.webdriver.common.by import By
from time import sleep

op = webdriver.ChromeOptions()
op.add_experimental_option("excludeSwitches", ["enable-automation"])
op.add_experimental_option("useAutomationExtension", False)
driver =webdriver.Chrome(options=op)
driver.get("https://www.mosoteach.cn/web/index.php?c=passport&m=index")

sleep(2)
driver.find_element(By.XPATH,"/html/body/div[1]/div[2]/div/div/div[3]/form[1]/input[1]").send_keys("18080157526")
sleep(2)
driver.find_element(By.XPATH,"/html/body/div[1]/div[2]/div/div/div[3]/form[1]/input[2]").send_keys(" ")
sleep(2)
driver.find_element(By.XPATH,"/html/body/div[1]/div[2]/div/div/div[3]/form[1]/button").click()
sleep(2)

assert "我的班课" in driver.title
# if title_name == "云班课 - 我的班课":
#     print("验证通过")
# else:
#     print("验证不通过","预期结果为'云班课 - 我的班课'","页面返回内容为{},".format(title_name))

driver.quit()